<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:output method="html" 
			doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
			doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
	
	<xsl:template match="/">
		<html xmlns="http://www.w3.org/1999/xhtml">
			<head>
				<title>SQL2XML - BOULINGUEZ &amp; CHENG - Consulter une question.</title>
				<link rel="stylesheet" type="text/css" href="ressources/sql2xml.css"/>
				<script type="text/javascript" src="ressources/js/jquery-1.6.2.min.js"></script>
				<script type="text/javascript" src="ressources/js/jquery-ui-1.8.16.custom.min.js"></script>
				<script type="text/javascript" src="ressources/js/ajax.js"></script>
			</head>
			<body>
				<div id="page">
					<img src="ressources/img/baniere_cmd.jpg" alt="logo sql2xml"/>
					<h1>SQL2XML - BOULINGUEZ &amp; CHENG</h1>
					<h3>
						<xsl:if test="Forum/Question/Resolu='true'">
							<img id="imgResolu" src="ressources/img/resolu_50.png" alt="Resolu" title="Sujet rÃ©solu"/>
						</xsl:if>
						<xsl:if test="Forum/Question/Resolu='false'">
							<img id="imgResolu" src="ressources/img/ouvert_50.png" alt="Ouvert" title="Sujet ouvert"/>
						</xsl:if>
						Question du <xsl:value-of select="Forum/Question/DateCreation"/> : <xsl:value-of select="Forum/Question/Sujet"/>
					</h3>
					<a id="btn_returnQuest" href="/SQL2XML2/Recherche">Nouvelle recherche</a>
					<xsl:choose>
						<xsl:when test="Forum/Message">
							<div id="errMsg">
								<xsl:value-of select="Forum/Message"/>
							</div>
						</xsl:when>
					</xsl:choose>
					<xsl:choose>
						<xsl:when test="Forum/Reponses">
							<xsl:for-each select="Forum/Reponses/Reponse">
								<table class="forum">
									<tr>
										<td>
											<b><a class="ajax_link" href="" onclick="doAjax('{EmailUtilisateur}'); return false;"><xsl:value-of select="PseudoUtilisateur"/></a></b>
											<br/>
											<center><img class="avatar" src="{AvatarUtilisateur}" alt="avatar utilisateur"/></center>
										</td>
										<td>
											<b><xsl:value-of select="DateReponse"/></b>
											<br/><br/>
											<xsl:value-of select="Reponse"/>
										</td>
										<td>
											<xsl:if test="Utile='true'">
												<img src="ressources/img/utile.png" width="20px" alt="Utile" title="Utile"/>
											</xsl:if>
											<br/>
											<xsl:value-of select="Votes"/> vote(s)
										</td>
									</tr>
								</table>
							</xsl:for-each>
							<xsl:choose>
								<xsl:when test="Forum/Reponses/Reponse/Message">
									<div id="errMsg">
										<xsl:value-of select="Forum/Reponses/Reponse/Message"/>
									</div>
								</xsl:when>
							</xsl:choose>
						</xsl:when>
					</xsl:choose>
            	</div>
				<div id="copyright">&#169;2011 sql2xml tous droits réservés <br/> BOULINGUEZ &amp; CHENG</div>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>